package example4;

public class Seller extends Employee{
    private double sale;
    private double royalty;
    public Seller(String name,double sale,double royalty,double salary){
        super(name,salary);
        this.royalty = royalty;
        this.sale = sale;
    }

    public double getSale() {
        return sale;
    }

    public void setSale(double sale) {
        this.sale = sale;
    }

    public double getRoyalty() {
        return royalty;
    }

    public void setRoyalty(double royalty) {
        this.royalty = royalty;
    }

    @Override
    public double calculateSalary(double sale) {

        double s2 = getSalary() + getSale()*getRoyalty();
        return s2;
    }

    @Override
    public void updateName() {

    }
}
